var util = require('util');
var Decorator = require('./decorator.js');

var decorator = new Decorator();

/**
 * 装饰接口的实现类B
 */
function ConcreteDecoratorB() {
  Decorator.call();
  this.operation = function() {
    decorator.operation();
    console.info('add some decorator by ConcreteDecoratorB');
  };
  this.addedBehavior = function() {
    console.info('addedBehavior by ConcreteDecoratorB');
  };
}

util.inherits(ConcreteDecoratorB, Decorator);

module.exports = ConcreteDecoratorB;
